package com.rankeiot.platform.domain;

import java.io.Serializable;
import java.util.Date;
import java.sql.Types;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.sagacity.sqltoy.config.annotation.Entity;
import org.sagacity.sqltoy.config.annotation.Id;
import org.sagacity.sqltoy.config.annotation.Column;

/**
 * 字典
 * @author desire
 */
@Schema(description = "字典")
@Data
@Entity(tableName="t_dictionary")
public class TDictionary implements Serializable{
    /**
    * 字典ID
    */
    @Id(strategy = "identity")
    @Column(name="id",length=10L,type=Types.INTEGER,nullable=false)
    private Integer id;
    /**
    * 名称
    */
    @Length(max=255)
    @Column(name="name",length=255L,type=Types.VARCHAR)
    private String name;
    /**
    * 排序
    */
    @Column(name="`rank`",length=10L,type=Types.INTEGER)
    private Integer rank;
    /**
    * 编码
    */
    @Length(max=50)
    @Column(name="sn",length=50L,type=Types.VARCHAR)
    private String sn;
    /**
    * 字典类型
    */
    @Length(max=50)
    @Column(name="type",length=50L,type=Types.VARCHAR)
    private String type;
    /**
    * 更新时间
    */
    @Column(name="update_time",length=26L,type=Types.TIMESTAMP)
    private Date updateTime;
    /**
     * 是否固定编码
     */
    @Column(name="is_fixed",length=1L,type=Types.TINYINT)
    private Boolean isFixed=false;
}
